<?php

return array(
	'status' => array(
		'ST_NONE' => '未完成',
		'ST_FINISHED' => '已完成',
	),
	'rules' => array(
		'class' => 'DefaultRuleParser',
		'config' => array(
			Receivables::TYPE_RA => array(
				'ST_NONE' => array('pay','view'),
				'ST_FINISHED' => array('view'),
				'*' => array('view'),
			),
			Receivables::TYPE_R => array(
				'ST_NONE' => array('receive','view'),
				'ST_FINISHED' => array('view'),
				'*' => array('view'),
			),
			AdminUser::ROLE_OPERATOR => array(
				'*' => array('view'),
			),
		),
		'roleDefines' => array(
			'Receivable' => '$data->getAttribute("object_type") == Receivables::TYPE_RA && $data->worker_id == Yii::app()->adminUser->id',
			'Receiver' => '$data->getAttribute("object_type") == Receivables::TYPE_R && $data->worker_id == Yii::app()->adminUser->id',
		),
	),
	
	'_import' => array(
		array('rules.roleDefines.*', 'status.common//rules.roleDefines.*'),
	),
);